import { MidwayConfig } from "@midwayjs/core";

export default {
  typeorm: {
    dataSource: {
      default: {
        type: "mysql",
        host: "127.0.0.1",
        port: 12306,
        username: "bblwx_zq_dep",
        password: "mWBp72PBtHtXGij2",
        database: "bblwx_zq_dep",
        synchronize: false, // 如果第一次使用，不存在表，有同步的需求可以写 true，注意会丢数据
        logging: false,
        entities: ["**/entity/*.entity{.ts,.js}"]
      }
    }
  },
  prize: {
    TOTAL_CODES_TO_GENERATE: 1000
  },
  // 微信小程序配置
  wxapp: {
    appid: "wx53f51fafcb687384",
    secret: "0ee867487a54fe40c958003bc0ab9894",
    grant_type: "client_credential",
    access_token_url: "https://api.weixin.qq.com/cgi-bin/token",
    access_token_cache_key: "wxapp_access_token",
    qrcode_url: "https://api.weixin.qq.com/wxa/getwxacodeunlimit",
    reward_page_path: "package/home/prize",
    env_version: "release",
    is_hyaline: false,
    check_path: false
  }
} as MidwayConfig;
